package com.example.composableexample.lazycolumn

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp

@Preview
@Composable
fun NestColumnSimple() {
    val items = remember {
        (0..100).map { "item$it" }
    }
    Column(modifier = Modifier.fillMaxSize(), Arrangement.spacedBy(12.dp)) {
        LazyColumn(modifier = Modifier.weight(1f)) {
            items(items) {
                Text(text = it, modifier = Modifier
                    .fillMaxWidth()
                    .height(30.dp)
                )
            }
        }
    }
}